﻿using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DevSamPle.FormPlugin
{
    [Description("【表单插件】BeforeF7Select基础资料，BeforeF7Select事件演示"), HotUpdate]
    public class CustBeforeF7Select : AbstractDynamicFormPlugIn
    {
        public override void BeforeF7Select(BeforeF7SelectEventArgs e)
        {
            base.BeforeF7Select(e);
            if (e.FieldKey.EqualsIgnoreCase("FSupplierId"))
            {
                var filter = e.ListFilterParameter.Filter;
                var cusPara = e.ListFilterParameter;
                //e.ListFilterParameter.Filter = "FNumber='VEN00009'";
                e.ListFilterParameter.Filter = e.ListFilterParameter.Filter.JoinFilterString("FNumber like '%VEN%'");
                e.ListFilterParameter.Filter = e.ListFilterParameter.Filter.JoinFilterString("FName like '%蓝海%'");
            }
        }
    }
}
